<template>
    <el-card>

        <div slot="header" class="clearfix">
            <span style="line-height: 36px;">受益人个数列表</span>
        </div>
        <el-table :data="list"  >
            <el-table-column prop="FAVOREE_NAME" label="姓名">
            </el-table-column>
            <el-table-column prop="FAVOREE_RELATION" label="与被保险人关系" >
            </el-table-column>
            <el-table-column prop="FAVOREE_SEX" label="性别">
            </el-table-column>
            <el-table-column prop="FAVOREE_BIRTHDAY" label="出生日期" :formatter="birthdayFomatter">
            </el-table-column>
            <el-table-column prop="FAVOREE_STYLE" label="证件类型">
            </el-table-column>
            <el-table-column prop="FAVOREE_NUMBER" label="证件号码">
            </el-table-column>
            <el-table-column prop="FAVOREE_TELPHONE" label="移动电话">
            </el-table-column>
            <el-table-column prop="FAVOREE_TEL" label="联系电话">
            </el-table-column>
            <el-table-column prop="FAVOREE_ZIP" label="邮编">
            </el-table-column>
            <el-table-column prop="FAVOREE_EMAIL" label="电子邮箱">
            </el-table-column>
            <el-table-column prop="FAVOREE_ADDRESS" label="常住地址">
            </el-table-column>
            <el-table-column prop="FAVOREE_PORTION" label="份额">
            </el-table-column>
            <el-table-column label="操作" width="100">
                <template scope="scope">
                    <el-button type="text" size="small" @click="delect(scope.$index)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-card>
</template>

<script>
import { mapState } from "vuex";
export default {
  computed: mapState({
    list: state => state.SealDetail.model.FAVOREEs
  }),
  methods: {
    delect(id) {
      this.list.splice(id, 1);
    },
    birthdayFomatter(row, column, cellValue) {          
      return new Date(cellValue).toLocaleDateString();
    }
  }
};
</script>

<style>

</style>
